import React from "react"
import SearchInput from "../../../component/SearchInput"
import "./style.less"
import {withRouter} from 'react-router-dom'

class SearchHeader extends React.Component {

    clickBackHandler(){
       this.props.history.push('/home')
    }

    render(){
        return(
            <div id="search-header" className="clear-fix">
                <span className="back-icon float-left" onClick={ this.clickBackHandler.bind(this) }>
                    <i className="icon-chevron-left"></i>
                </span>
                <div className="input-container">
                    <i className="icon-search"></i>
                    <SearchInput values={this.props.values}/>
            </div>
            </div>
                
        )
    }
}

export default withRouter(SearchHeader)